<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html 	xmlns="http://www.w3.org/1999/xhtml"
		xmlns:h="http://java.sun.com/jsf/html"
		xmlns:f="http://java.sun.com/jsf/core"
		xmlns:a="http://richfaces.org/a4j" 
		xmlns:r="http://richfaces.org/rich"
		xmlns:ui="http://java.sun.com/jsf/facelets">

<ui:composition template="/template/templateComum.xhtml">
	
	<ui:define name="title">
	    
	    <h:outputText value="#{msg['mex.pag.cadastro']}" />
	    
	</ui:define>
	
	<ui:define name="content">
		
		<div id="body">
			
			<r:messages ajaxRendered="true" />
		
			<h:form>
				
				<r:jQuery 			selector="#Cnpj" 
									query="mask('999.999.999/9999-99')" 
									timing="domready" />
		
				<r:jQuery 			selector="#Cpf" 
									query="mask('999.999.999-99')" 
									timing="domready" />
			
				<r:togglePanel>
					
					<r:togglePanelItem>
					
						<fieldset>
							<legend class="titulo">
								<h:outputText value="#{msg['mex.legend.cadastro']}" />
							</legend>
						
							<h:panelGrid id="PessoaJuridica" columns="2" cellpadding="7" columnClasses="colunaLabel, colunaComp">
								
								<h:outputLabel		value="#{msg['mex.label.cnpj']}"
													for="Cnpj" 
													styleClass="txtComum" />
								<h:inputText 		id="Cnpj"
													value="#{cadastroBean.empresa.cnpj}"
													styleClass="comComum"
													style="font-size: 16px;color:#6B6854;"
													label="#{msg['mex.txt.cnpj']}" 
													required="true"/>
								
								<h:outputLabel		value="#{msg['mex.label.razao.social']}"
													for="RazaoSocial" 
													styleClass="txtComum" />
								<h:inputText	 	id="RazaoSocial"
													value="#{cadastroBean.empresa.razaoSocial}"
													styleClass="comLarger"
													style="font-size: 16px;color:#6B6854;"
													label="#{msg['mex.txt.razao.social']}" 
													required="true"/>
								
								<h:outputLabel		value="#{msg['mex.label.nome.fantasia']}"
													for="NomeFantasia" 
													styleClass="txtComum" />
								<h:inputText 		id="NomeFantasia"
													value="#{cadastroBean.empresa.nomeFantasia}"
													styleClass="comLarger"
													style="font-size: 16px;color:#6B6854;"
													label="#{msg['mex.txt.nome.fantasia']}" 
													required="true"/>
													
								<h:outputLabel 		value="#{msg['mex.label.ramo.atuacao']}"
													for="RamoAtuacao"
													styleClass="txtComum" />
								<r:select			id="RamoAtuacao"
													styleClass="comComum"
													style="font-size: 16px;color:#6B6854;"
													label="#{msg['mex.txt.nome.fantasia']}"
													defaultLabel="Selecione"
													enableManualInput="true">
									
								</r:select>
								
								<h:outputLabel 		value="#{msg['mex.label.data.fundacao']}"
													for="DataCriacao"
													styleClass="txtComum" />
								<r:calendar 		id="DataCriacao"
													value="#{cadastroBean.empresa.dataFundacao}"
													datePattern="dd/M/yyyy"
													style="font-size: 16px;color:#6B6854;"
													label="#{msg['mex.txt.nome.fantasia']}"/>
								
							</h:panelGrid>
							
							<h:commandButton style="float:right" value="Next &gt;&gt;">
            					<r:toggleControl targetItem="@next" event="click"/>
        					</h:commandButton>
									
						</fieldset>
					
					</r:togglePanelItem>
					
					<r:togglePanelItem>
					
						<fieldset>
							<legend class="titulo">
								<h:outputText value="#{msg['mex.legend.cadastro.admin']}" />
							</legend>
							
							<h:panelGrid id="PessoaFisica" columns="2" cellpadding="7" columnClasses="colunaLabel, colunaComp">
							
								<h:outputLabel 	value="#{msg['mex.label.cpf']}"
												for="Cpf"
												styleClass="txtComum" />
								<h:inputText	id="Cpf"
												value=""
												styleClass="comComum"
												style="font-size: 16px;color:#6B6854;"
												label="#{msg['mex.txt.razao.social']}" 
												required="true"/>
								
								<h:outputLabel 	value="#{msg['mex.label.nome']}"
												for="Nome"
												styleClass="txtComum" />
								<h:inputText	id="Nome"
												value=""
												styleClass="comLarger"
												style="font-size: 16px;color:#6B6854;"
												label="#{msg['mex.txt.razao.social']}" 
												required="true"/>
								
								<h:outputLabel 	value="#{msg['mex.label.email']}"
												for="Email"
												styleClass="txtComum" />
								<h:inputText	id="Email"
												value=""
												styleClass="comLarger"
												style="font-size: 16px;color:#6B6854;"
												label="#{msg['mex.txt.razao.social']}" 
												required="true"/>
								
							</h:panelGrid>
							
							<h:commandButton style="float:right" value="Next &gt;&gt;">
            					<r:toggleControl targetItem="@prev" event="click"/>
        					</h:commandButton>
							
							<h:commandButton style="float:right" value="Next &gt;&gt;">
            					<r:toggleControl targetItem="@next" event="click"/>
        					</h:commandButton>
								
						</fieldset>
					
					</r:togglePanelItem>
					
				</r:togglePanel>
				
			</h:form>
			
		</div>
		    
	</ui:define>
	
</ui:composition>
</html>